//
//  YaoHKJHCell.m
//  KuWoCan
//
//  Created by hwd on 17/3/6.
//  Copyright © 2017年 hwd. All rights reserved.
//

#import "YaoHKJHCell.h"

@interface YaoHKJHCell ()

@property (nonatomic,strong) UIImageView *headImageV;

@property (nonatomic,strong) UILabel *numberLab;

@property (nonatomic,strong) UILabel *numberSYLab;

@property (nonatomic,strong) UILabel *timeLab;

@property (nonatomic,strong) UILabel *DetailtimeLab;


@end


@implementation YaoHKJHCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = 0;
    }
    return self;
    
}
-(void)loadCellWith:(NSDictionary *)dataDic
{
    for (UIView *view in self.contentView.subviews) {
        [view removeFromSuperview];
    }
 
    _headImageV = [[UIImageView alloc]initWithFrame:CGRectMake(15*screenW_6, 20*screenW_6, 35*screenW_6, 35*screenW_6)];
    _headImageV.image = [UIImage imageNamed:@"people"];
    [self.contentView addSubview:_headImageV];

    _numberLab = [TomamaUI createLabel:CGRectMake(CGRectGetMaxX(_headImageV.frame)+10*screenW_6, 12.5*screenW_6, 150*screenW_6, 25*screenW_6) textAligment:0 font:[UIFont systemFontOfSize:15*screenW_6] textColor:[UIColor colorWithHexString:@"#55aee9"] text:@"李四"];
    [self.contentView addSubview:_numberLab];
    
    _numberSYLab = [TomamaUI createLabel:CGRectMake(CGRectGetMaxX(_headImageV.frame)+10*screenW_6,CGRectGetMaxY(_numberLab.frame),100*screenW_6, 25*screenW_6) textAligment:0 font:[UIFont systemFontOfSize:15*screenW_6] textColor:[UIColor colorWithHexString:@"ff6000"] text:@"1500箱"];
    [self.contentView addSubview:_numberSYLab];
    
    UIImageView *nextImage = [TomamaUI createImageView:CGRectMake(SCREENW-40*screenW_6, 12.5*screenW_6, 25*screenW_6, 25*screenW_6) backGroundImageV:@"next"];
    [self.contentView addSubview:nextImage];
    
    _timeLab = [TomamaUI createLabel:CGRectMake(SCREENW-150*screenW_6 ,CGRectGetMinY(_numberLab.frame),110*screenW_6,25*screenW_6) textAligment:2 font:[UIFont systemFontOfSize:14*screenW_6] textColor:[UIColor colorWithHexString:@"55aee9"] text:@"2017-03 第一周"];
    [self.contentView addSubview:_timeLab];
    
    
    _DetailtimeLab = [TomamaUI createLabel:CGRectMake(CGRectGetMaxX(_numberSYLab.frame),CGRectGetMinY(_numberSYLab.frame),SCREENW-200*screenW_6,25*screenW_6) textAligment:2 font:[UIFont systemFontOfSize:14*screenW_6] textColor:[UIColor colorWithHexString:@"999999"] text:@"2017-03-03 15:23:59"];
    [self.contentView addSubview:_DetailtimeLab];
    
}

- (void)setModel:(PlanListModel *)model
{
    _numberLab.text = model.distributorName;
    _numberSYLab.text = [NSString stringWithFormat:@"%@箱",model.totalBox];
    _timeLab.text = [NSString stringWithFormat:@"%@ 第%@周",model.cargoDate,model.cargoWeeks];
    _DetailtimeLab.text = model.createDate;
    
}


@end
